<div id="mainColumns">
	<?php echo $this->element('statistic');?>
	<h2>クラス一覧を見る</h2>
		<?php echo $this->Form->create('Course', array('url' => array('controller' => 'course', 'action' => 'index', 'admin' => true), 'type' => 'post'));?>
		<?php echo $this->element('course/admin_toolbox');?>
		<?php echo $this->Form->hidden('type', array('value' => '', 'name' => 'data[type]', 'id' => 'jsDataType'));?>
		<?php $i = 0;?>
		<?php foreach ($courses as $course):?>
		<div class="approvedCourse clearfix <?php if ($i++ % 2 == 0):?>even<?php endif;?>">
			<div class="leftBox"><label for="course_id<?php echo $course['Course']['id'];?>">
				<?php echo $this->Form->checkbox('id', array('name' => 'data[id][]', 'id' => 'course_id'.$course['Course']['id'], 'value' => $course['Course']['id'], 'label' => false, 'hiddenField' => false));?></label></div>
			<div class="rightBox clearfix">
				<h3><?php echo $this->Html->link($course['Course']['title'], array('controller' => 'course', 'action' => 'edit', 'admin' => true, $course['Course']['id']));?></h3>
				<div class="userBox clearfix">
					<img src="<?php echo Configure::read('Course.upload_path_prefix').$course['Course']['course_image01'];?>" alt="user name" class="userIcon" />
					<p class="userName"><span class="title">ユーザ名</span><br /><?php echo $course['Profile']['first_name'];?>&nbsp;<?php echo $course['Profile']['last_name'];?></p>
					<p class="userHeadline"><span class="title">肩書き</span><br /><?php echo $course['Profile']['headline'];?></p>
				</div>
				<div class="courseDetail">
					<p class="price"><span class="title">デモ画面</span><br /><?php echo $this->Html->link('デモ画面を見る', array('action' => 'view', $course['Course']['id'], 'admin' => false));?></p>
				</div>
			</div>
		</div>
		<?php endforeach;?>
		<?php echo $this->element('course/admin_toolbox');?>
	<?php echo $this->Form->end();?>
	<div id="pageNationBox">
		<?php echo $this->element('admin_paginator');?>
	</div>
</div>
<div id="subColumns">
	<?php echo $this->Form->Create('search', array('url' => array('controller' => 'course', 'action' => 'index', 'admin' => true), 'type' => 'get'));?>
	<div class="section">
		<div class="rows select">
			<p>検索結果数</p>
			<select name="limit" id="search_result_num">
				<option value="25" <?php if (isset($this->params['url']['limit']) && $this->params['url']['limit'] == 25):?>selected="selected"<?php endif;?>>25</option>
				<option value="50" <?php if (isset($this->params['url']['limit']) && $this->params['url']['limit'] == 50):?>selected="selected"<?php endif;?>>50</option>
				<option value="100" <?php if (isset($this->params['url']['limit']) && $this->params['url']['limit'] == 100):?>selected="selected"<?php endif;?>>100</option>
			</select>
		</div>
		<div class="rows select">
			<p>検索結果の並び順</p>
			<select name="sort" id="search_result_order">
				<option value="newest" <?php if (isset($this->params['url']['sort']) && $this->params['url']['sort'] == 'newest'):?>selected="selected"<?php endif;?>>新着順</option>
				<option value="oldest" <?php if (isset($this->params['url']['sort']) && $this->params['url']['sort'] == 'oldest'):?>selected="selected"<?php endif;?>>古着順</option>
			</select>
		</div>
	</div>
	<div class="section">
		<div class="rows">
			<label for="delete_course"><input type="checkbox" value="1" name="del" id="delete_course"
				<?php if (isset($this->params['url']['del']) && 1 == $this->params['url']['del']):?>checked="checked"<?php endif;?> /> コースを削除する</label>
		</div>
		<div class="rows">
			<label for="already_authenticated"><input type="checkbox" value="1" name="auth[]" id="already_authenticated"
				<?php if (isset($this->params['url']['auth']) && in_array(1, $this->params['url']['auth'])):?>checked="checked"<?php endif;?>  /> 既に認証されたもの</label>
		</div>
		<div class="rows">
			<label for="not_yet_authenticated"><input type="checkbox" value="0" name="auth[]" id="not_yet_authenticated"
				<?php if (isset($this->params['url']['auth']) && in_array(0, $this->params['url']['auth'])):?>
					checked="checked"
				<?php elseif (!isset($this->params['url']['auth']) && !isset($this->params['url']['del']) && !isset($this->params['url']['rec'])):?>
					checked="checked"
				<?php endif;?>  />まだ認証されていないもの</label>
		</div>
		<div class="rows">
			<label for="recommend"><input type="checkbox" value="1" name="rec" id="recommend"
					<?php if (isset($this->params['url']['rec']) && 1 == $this->params['url']['rec']):?>
					checked="checked"
				<?php endif;?>  /> 今月のPickUpコース</label>
		</div>
	</div>
	<?php echo $this->Form->end('検索');?>
</div>